package com.yunhe.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.runner.Request;

import com.yun.dao.UserDao;
import com.yunhe.bean.ShopUser;
import com.yunhe.util.MySession;

public class Dingdan11 {
	
	//分页 订单
	public List<ShopUser> DiaoUsDao1(int currpage){
		SqlSession se = MySession.getSession();
		
		UserDao mapper = se.getMapper(UserDao.class);
		
		List<ShopUser> au1 = mapper.UidToOders9(currpage);
		
		return au1;
	}
	
	//总条数 订单
	public List<ShopUser> DiaoUsDao(){
		SqlSession se = MySession.getSession();
		
		UserDao mapper = se.getMapper(UserDao.class);
		
		List<ShopUser> au = mapper.UidToOders();
		
		return au;
		
	}
	
	//oid查订单
	public List<ShopUser> OidDingDan(int a){
		SqlSession se = MySession.getSession();
		UserDao mapper = se.getMapper(UserDao.class);
		
		List<ShopUser> aa = mapper.UidToOders10(a);
		return aa;
	}
	
	
	
	
	
	
	
	
	
	
	
	
	public static void main(String[] args) {
		
		Dingdan11 di = new Dingdan11();

		int zongtiao =  di.DiaoUsDao().size();
		
		int zongye = zongtiao%3 == 0?zongtiao/3:zongtiao/3+1;
		
		System.out.println(zongye);

		System.out.println(zongtiao);
		
	}
}
